/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

/**
 *报废申请单列表
 * @param params
 * @returns {*}
 */
export const queryBFOrderListApi = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryBFOrderList`, {
  params
});
/**
 * 报废申请工具列表
 * @param params
 * @returns {*}
 */
export const queryBFOrderToolsApi = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryBFOrderTools`, {
  params
});
/**
 * 查询工具列表
 * @param params
 * @returns {*}
 */
export const queryToolsApi = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/queryTools`, {
  params
});
/**
 * 报废存储
 * @param params
 * @returns {*}
 */
export const scrapSave = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/bfSave`, params);
/**
 * 报废单状态修改
 * @param params
 * @returns {*}
 */
export const modifyScrapOutOrderStatus = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/modifyScrapOutOrderStatus`, params);
/**
 * 报废单状态修改
 * @param params
 * @returns {*}
 */
export const bfOrderSubmit = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/bfOrderSubmit`, params);
/**
 * 报废单删除
 * @param params
 * @returns {*}
 */
export const deleteById = params => axios.post(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/deleteBForder`, params);
/**
 * 处理库存
 * @param params
 * @returns {*}
 */
export const dealStock = params => axios.put(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/dealStock`, params);

// 参数查询
export const doSearch = params => axios.post(`${SERVER.DMSCLOUD_BASEDATA}/params/doSearch`, params);

// 获取报废出库单打印信息
export const printBfOutStorageBill = params => axios.get(`${SERVER.TOOLMANAGEMENT}/borrowOrReturn/printBfOutStorageBill`, {
  params
});
